// 物资管理
var reclistColumns = [{
    id: 'materTypeName',
    title: '物资种类',
    type: 'string',
    width: 75,
    columnClass: 'text-center',
  }, {
    id: 'materName',
    title: '名称',
    type: 'string',
    columnClass: 'text-center',
  }, {
    id: 'amount',
    title: '库存',
    type: 'string',
    width: 75,
    columnClass: 'text-center',
  }, {
    id: 'materArea',
    title: '地点',
    type: 'string',
    width: 75,
    columnClass: 'text-center',
  }, 
  // {
  //   id: 'operation',
  //   title: '操作',
  //   width: 100,
  //   type: 'string',
  //   columnClass: 'text-center',
  //   resolution: function (value, record, column, grid, dataNo, columnNo) {
  //     var content = '';
  //     content += '<a class="btn btn-xs btn-primary" href="#/selreclist"><i class="icon-eye-open"></i>  领用记录</a>';
  //     return content;
  //   }
  // }
];


// 物资领用记录
var reclogColumns = [{
  id: 'userName',
  title: '申请人',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'type',
  title: '物资种类',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'pname',
  title: '名称',
  type: 'string',
  width: 150,
  columnClass: 'text-center',
}, {
  id: 'number',
  title: '领取数量',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'time',
  title: '领用时间',
  type: 'string',
  width: 150,
  columnClass: 'text-center',
}, {
  id: 'msg',
  title: '理由/备注说明',
  type: 'string',
  // width: 200,
  columnClass: 'text-left',
}];
/*var reclogOption = {
  lang: 'zh-cn',
  ajaxLoad: false,
  // loadURL:'url',
  exportFileName: '物资领用记录',
  datas: [{
    userName: '张三',
    type: '红酒',
    pname: '罗曼尼-康帝',
    number: '8',
    time: '2018-01-02 15:00',
    msg: '理由/备注说明测试数据'
  }],
  columns: reclogColumns,
  gridContainer: 'reclogContainer',
  toolbarContainer: 'reclogToolBarContainer',
  tools: '',
  pageSize: 10,
  pageSizeLimit: [10, 15, 20]
};
var reclogGrid = $.fn.dlshouwen.grid.init(reclogOption);
$(function () {
  reclogGrid.load();
});*/


// 入库历史记录
var greclogColumns = [{
  id: 'applyManName',
  title: '录入人',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'materTypeName',
  title: '物资种类',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'materName',
  title: '名称',
  type: 'string',
  width: 150,
  columnClass: 'text-center',
},  {
  id: 'unitPrice',
  title: '单价',
  type: 'string',
  width: 150,
  columnClass: 'text-center',
  resolution: function (value, record, column, grid, dataNo, columnNo) {
    var content = '￥' + value + '元';
    return content;
  }
}, {
  id: 'amount',
  title: '入库数量',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
},{
  id: 'materArea',
  title: '地点',
  type: 'string',
  width: 75,
  columnClass: 'text-center',
}, {
  id: 'createTime',
  title: '录入时间',
  type: 'string',
  width: 150,
  columnClass: 'text-center',
  resolution : function (value, record, column, grid, dataNo, columnNo) {
      var date = new Date(record.createTime);
      var content = $.fn.dlshouwen.grid.tools.dateFormat(date, "yyyy-MM-dd hh:mm");
      return content;
  }
}, {
  id: 'descr',
  title: '备注说明',
  type: 'string',
  // width: 200,
  columnClass: 'text-left',
}];
